package com.hk.service.business.lock4j;

import com.baomidou.lock.LockFailureStrategy;
import com.hk.exception.BizException;
import org.springframework.stereotype.Service;

import java.lang.reflect.Method;

@Service
public class CustomLockFailureStrategy implements LockFailureStrategy {

    @Override
    public void onLockFailure(String key, Method method, Object[] arguments) {
        throw new BizException("访问太频繁，请稍后再试~");
    }
}
